﻿<link href="@Url.Content("~/content/activitie_detail.css")" rel="stylesheet" type="text/css"/>

@model Int32
@{
    ViewBag.Title = "Quota";
}
@*@Html.Partial("_ActivityNavPartial",Model)*@

<div id="m-title">
    <h2>配额</h2>
    <div id="m-op" class="f-bow">
        @using (Html.BeginForm("AddQuota", "CandidateQuota", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
            @Html.ActionLink(" 下载配额模板", "Download", "Home", new { filename = "CandidateQuotaTemplate.xlsx" }, new { @class = "f-btn-long" })<span>&#8195;</span>
            <div class="u-uf"><input type="file" name="file" class="fileNew" id="fileNew" onchange="document.getElementById('textNew').value=this.value" /></div>
            <input type="text" name="textNew" id="textNew" class="u-it textNew" readonly="true" />
            <input type="button" class="u-btn btnNew" value="浏览" />
            <input type="submit" value="导入" class="u-btn f-rd-mr" />
            @Html.Hidden("activityID", new { activityID = Model })
        }
    </div>
</div>

<fieldset>
    <div class="m-sd-xx m-sd-title">
        <div class="title">
            配额表
        </div>
        <div class="sidebd displayCoordinate">
            @Html.PivotTable((System.Data.DataTable)ViewData["StatusTable"], "SubjectName", "CountyName", new string[] { "Quota" })
        </div>
    </div>
    <div class="m-sd-xx m-sd-title">
        <div class="title">
            修改配额
        </div>
        <div class="sidebd u-save">
            @using (Html.BeginForm("ChangeQuota", "CandidateQuota", FormMethod.Post))
            {
                @Html.Hidden("ActivityID", Model)
                <div>区县：@Html.DropDownList("CountyCode", String.Empty)</div>
                <div>学科：@Html.DropDownList("SubjectID", string.Empty)</div>
                <div>配额：@Html.TextBox("Quota",null,new {@class="u-it"})</div>
                <div><input type="submit" value="保存" class="u-btn"/></div>
            }
        </div>
    </div>

    <div class="m-sd-xx m-sd-title">
        <div class="title">
            删除配额
        </div>
        <div class="sidebd del">
            @using (Html.BeginForm("DeleteQuota", "CandidateQuota", FormMethod.Post))
            {
                @Html.Hidden("ActivityID", new { activityID = Model })
                <div>学科：@Html.DropDownList("SubjectID", string.Empty)</div>
                <br />
                <div>
                    1）已经有档案的配额不会被删除！需要先删除档案，然后再 <input type="submit" value="删除" class="u-btn u-btn-del" /> 配额。<br />
                    2）已经有评委组或评分规则的学科不会被删除！
                </div>

            }
        </div>
    </div>
</fieldset>